package com.demo.design.behavioral.mediator.impl;

import com.demo.design.behavioral.mediator.Colleague;
import com.demo.design.behavioral.mediator.Mediator;

public class DartzonColleague extends Colleague {

    public DartzonColleague(Mediator mediator) {
        super(mediator);
        if (name == null || "".equals(name)) {
            name = "dartzon" + (System.currentTimeMillis() % 1000000);
        }
    }

    public DartzonColleague(String name, Mediator mediator) {
        super(name, mediator);
    }

    @Override
    public void getNotice(String msg) {
        System.err.println(name + "得到消息:" + msg);
    }


}
